//
//  GToolUtil.m
//  KDIOSApp
//
//  Created by 曹晓丽 on 16/4/27.
//  Copyright © 2016年 KDIOSApp. All rights reserved.
//

#import "GToolUtil.h"
#import "sys/utsname.h"
#import "AFNetworkReachabilityManager.h"
#import <AVFoundation/AVCaptureDevice.h>
#import <AVFoundation/AVMediaFormat.h>
@interface GToolUtil()
@end

@implementation GToolUtil


//获取网络状态
+(NSString *) getNetworkType{
    
    NSString *type = @"";
    AFNetworkReachabilityStatus status = [[AFNetworkReachabilityManager sharedManager] networkReachabilityStatus];
    if (status == AFNetworkReachabilityStatusReachableViaWWAN) {
        //2g,3g
        type = @"2g,3g,4g";
    }
    else if (status == AFNetworkReachabilityStatusReachableViaWiFi)
    {
        //wifi
        type = @"wifi";
    }
    return type;
}

+ (NSString *)getCurrentAppVersionCode
{
    NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
    NSString *version = [infoDict objectForKey:@"CFBundleShortVersionString"];
    return version;
}


@end
